<template>
	<view :class="['qn-page-' + theme]" class="box">
		<view class="close-view"><text class="ibonfont ibonguanbi1" @click="closePage"></text></view>
		<view class="top-bg"></view>
		<view class="welcome-title">
			<view>嗨～朋友</view>
			<view>欢迎使用{{ base_set_info.shop || '' }}</view>
		</view>
		<view class="logo-img"><image :src="base_set_info.images" mode="aspectFill"></image></view>
		<view class="login-bg">
			<image :src="imgHost + '/statics/login-img.jpg'" mode="aspectFill"></image>
			<view class="login-btn-view">
				<view class="wx-Btn">
					<Login @loginFinish="loginFinish">
						<view slot="lBtn" style="color: #fff;"><text>微信授权快速登录</text></view>
					</Login>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import Login from '@/components/Login.vue';
import webUrl from '@/config.js';
export default {
	components: {
		Login
	},
	data() {
		return {
			imgHost : webUrl.QN_URL,
			userInfo: {},
			wxUserInfo: {},
			base_set_info: {}
		};
	},
	onShow() {
		// #ifdef MP
		uni.hideHomeButton();
		// #endif
	},
	onLoad() {
		this.base_set_info = this.$store.state.baseSet;
	},
	methods: {
		loginFinish() {
			uni.switchTab({
				url: '/pages/index/index'
			});
		},
		// 拒绝跳转主页面
		closePage() {
			this.goPage('/pages/index/index', 'switchTab');
		}
	}
};
</script>
<style>
page {
	background-color: #ffffff;
}
</style>
<style scoped lang="scss">
.box {
	.close-view {
		position: fixed;
		left: 0;
		padding-left: 30upx;
		width: 100%;
		top: 70upx;
		z-index: 99;
		.ibonguanbi1 {
			font-size: 30upx;
		}
	}
	.top-bg {
		width: 385rpx;
		height: 385rpx;
		background: linear-gradient(315deg, #fa6400 6%, #b620e0 49%, #32c5ff 88%);
		opacity: 0.08;
		filter: blur(50px);
		position: fixed;
		top: 20rpx;
		left: 0;
		z-index: 0;
	}
	.welcome-title {
		position: fixed;
		top: 162rpx;
		left: 56rpx;
		font-weight: bold;
		z-index: 1;
		line-height: 80rpx;
		font-family: jiangxikaiti;
		font-size: 46rpx;
	}
	.logo-img {
		position: fixed;
		top: 150rpx;
		right: 56rpx;
		image {
			width: 120rpx;
			border-radius: 34rpx;
			height: 120rpx;
			display: block;
			box-shadow: 0px 0px 20rpx 8rpx rgba(250, 100, 0, 0.08);
		}
	}
	.login-bg {
		position: fixed;
		top: 430rpx;
		left: 0;
		width: 100%;
		image {
			width: 360rpx;
			height: 360rpx;
			display: block;
			margin: 0 auto;
		}
		.login-btn-view {
			width: 638rpx;
			margin: 0 auto;
			.wx-Btn {
				margin-top: 156rpx;
				width: 638rpx;
				height: 89rpx;
				background: #fa6400;
				border-radius: 11rpx;
				line-height: 89rpx;
				text-align: center;
				font-weight: 500;
				color: #ffffff;
			}
			.yzm-Btn {
				margin-top: 40rpx;
				text-align: center;
				width: 638rpx;
				height: 80rpx;
				line-height: 80rpx;
				border-radius: 11rpx;
				border: 1px solid #cad0d7;
				color: #2d405e;
				font-size: 26rpx;
				.ibonshouji1 {
					font-size: 26rpx;
					margin-right: 14rpx;
				}
			}
		}
	}
}
</style>
